<?php
$httpheader=<<<TEXT
GET https://detail.1688.com/offer/536137392840.html?spm=a260j.12536179.jr91vrik.6.6ce1e287Wwkc4l&scm=1007.30832.181565.0&pvid=7e4a5ab6-c932-46a3-8347-86300fc63424&object_id=536137392840&scm2=1007.30657.177495.0&pvid2=973e4c0f-494c-44fe-9861-21ec92a52e85&trackInfo=4_536137392840_0.068969_0.0_0.0_0.0__1292874 HTTP/1.1
Host: detail.1688.com
Connection: keep-alive
Cache-Control: max-age=0
sec-ch-ua: "Google Chrome";v="107", "Chromium";v="107", "Not=A?Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,ja;q=0.6,bg;q=0.5,zh-TW;q=0.4,ru;q=0.3,th;q=0.2
Cookie: cna=J9YiHCH/FhQCAbSMoJIPUvPl; lid=yzs1013; _bl_uid=p4l73e9Unaqy8pz147Xj99p7Ipa3; ali_ab=116.252.89.53.1677639087661.0; keywordsHistory=%E8%BF%B7%E4%BD%A0%E8%A3%99; __utma=62251820.1702413566.1677641166.1677641166.1677641166.1; __utmz=62251820.1677641166.1.1.utmcsr=shuaishou.com|utmccn=(referral)|utmcmd=referral|utmcct=/; xlly_s=1; __mwb_logon_id__=undefined; _m_h5_tk=fd211c4271320cea9bc5282c63b5959d_1677729896677; _m_h5_tk_enc=843686934ef0468124e37c04d43c7f33; cookie2=101b2334b39a2ade839458487f277b0e; sgcookie=E100rO%2FkTxVun1UZ5x2L1aOGJmOX%2BzEMZXh0Jq6bIw5XruELdQwOfvLL1%2FtTKRFsrn62WarNTv3QA1yIo2QVG0h83m7V%2FtJEPzYnbeYzlmoJ9t4%3D; t=40f0a187fb3836d30f43759cc66299b2; _tb_token_=330515be7df7; uc4=id4=0%40VXtaSWpGBRARtNDb1cz884FkkQ%3D%3D&nk4=0%40GJ2FQQPI7120KRgMZDfCd6of; __cn_logon__=false; _csrf_token=1677720187949; x5sec=7b226c61707574613b32223a223135663162353265353264656164313034363163336463666330646238306539434b5765674b4147454e4b63792f71577059615775774561436a51774e446b324d5441344f7a4977397179704b6b4144227d; alicnweb=touch_tb_at%3D1677725580067; tfstk=cpbVBy2durU4aU5TpUYNYJkMRb8laasff0RHmRiDbCxmVkKDLsVnBQXzNLJiaAxc.; l=fB_DKlr7TqRQmfmzBOfZourza779AIRAguPzaNbMi9fPO07p5LnlW1GxtmR9CnGNFsLeR3r0glSeBeYBqBAnnxvTlFK37PkmnmOk-Wf..; isg=BE9Ppsqnd0YiV3TH5w7erFuE3uNZdKOWI-nuB2FcyL7FMG8yaUTU5c8qNmiOSHsO     




TEXT;

$ch = curl_init();      
curl_setopt($ch, CURLOPT_URL, "http://collect1.longsunhd.com:81/collect/reset/json.php?getPhpCode=1");      
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true );       
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);      
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);   
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0');      
curl_setopt($ch, CURLOPT_HEADER, 0);        
curl_setopt($ch, CURLOPT_TIMEOUT, 30);  
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15);    
curl_setopt($ch, CURLOPT_POST, true );      
curl_setopt($ch, CURLOPT_POSTFIELDS, array("httpheader"=>$httpheader));     
curl_setopt($ch, CURLINFO_HEADER_OUT, 1);
$result=curl_exec($ch);  
$request_header = preg_replace("/^((POST|GET)\s*[^\s]+)\s+http/Uixs","\\1&XDEBUG_SESSION_START=543534 HTTP",curl_getinfo($ch, CURLINFO_HEADER_OUT)).http_build_query(array("httpheader"=>$httpheader))."\r\n\r\n";
$request_header = preg_replace('/Content\-Type\:[^\r\n]+/imx','Content-Type: application/x-www-form-urlencoded',$request_header);
//echo $request_header;exit;
curl_close($ch);
$data=json_decode($result,1);
print_r($data);